<html>
<head><meta charset="utf-8"><title>git pr · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/git.20pr.html">git pr</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="146964973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/git%20pr/near/146964973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/git.20pr.html#146964973">(Nov 07 2018 at 15:16)</a>:</h4>
<p>Remembered a git alias I've got that people here might find useful:</p>
<div class="codehilite"><pre><span></span>pr = &quot;!f() { git fetch -fu upstream refs/pull/$1/head:pr/$1; git checkout pr/$1; } ; f&quot;
</pre></div>


<p>Running <code>git pr 33333</code> would fetch that PR.</p>



<a name="146965002"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/git%20pr/near/146965002" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/git.20pr.html#146965002">(Nov 07 2018 at 15:17)</a>:</h4>
<p>(assuming the remote you have for <code>rust-lang/rust</code> is called <code>upstream</code>)</p>



<a name="146965821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/git%20pr/near/146965821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/git.20pr.html#146965821">(Nov 07 2018 at 15:29)</a>:</h4>
<p>You might also be interested in <code>hub</code> <a href="https://hub.github.com/" target="_blank" title="https://hub.github.com/">https://hub.github.com/</a></p>



<a name="146967000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/git%20pr/near/146967000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/git.20pr.html#146967000">(Nov 07 2018 at 15:45)</a>:</h4>
<p>I have this in my <code>.git/config</code>:</p>



<a name="146967082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/git%20pr/near/146967082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/git.20pr.html#146967082">(Nov 07 2018 at 15:46)</a>:</h4>
<div class="codehilite"><pre><span></span>[remote &quot;origin&quot;]
    url = https://github.com/rust-lang/rust.git
    fetch = +refs/heads/*:refs/remotes/origin/*
    fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
</pre></div>



<a name="146967110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/git%20pr/near/146967110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/git.20pr.html#146967110">(Nov 07 2018 at 15:46)</a>:</h4>
<p>so with every <code>git fetch origin</code> I get not only the updated heads for branches, but also all the PRs.</p>



<a name="146967151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/git%20pr/near/146967151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/git.20pr.html#146967151">(Nov 07 2018 at 15:47)</a>:</h4>
<p>In action:</p>
<div class="codehilite"><pre><span></span>$ git fetch origin
remote: Enumerating objects: 3220, done.
remote: Counting objects: 100% (3220/3220), done.
remote: Compressing objects: 100% (123/123), done.
remote: Total 4289 (delta 3149), reused 3140 (delta 3097), pack-reused 1069
Receiving objects: 100% (4289/4289), 1.72 MiB | 2.85 MiB/s, done.
Resolving deltas: 100% (3574/3574), completed with 976 local objects.
From https://github.com/rust-lang/rust
   757d6cc91a6..b79e5eec705  auto                 -&gt; origin/auto
   3fc70e8d468..8315b11b635  master               -&gt; origin/master
   da5f414c2c0..1433507eba7  stable               -&gt; origin/stable
 + 5f8bd0aff7b...3af441bb024 try                  -&gt; origin/try  (forced update)
   cfc8d2c7164..3de5f1c0b91  refs/pull/53506/head -&gt; origin/pr/53506
   bfc4b41b78b..ddde8346d65  refs/pull/53645/head -&gt; origin/pr/53645
   35bbcf14f4c..f8723036235  refs/pull/53996/head -&gt; origin/pr/53996
 + 02b67a429d6...8960b0f1201 refs/pull/54125/head -&gt; origin/pr/54125  (forced update)
 + 5f8bd0aff7b...3af441bb024 refs/pull/54633/head -&gt; origin/pr/54633  (forced update)
   1fff3e3e508..906dedc9170  refs/pull/54668/head -&gt; origin/pr/54668
 + d2f2446e9f6...50c7e80d217 refs/pull/54864/head -&gt; origin/pr/54864  (forced update)
 + e251995e710...d60290fc63b refs/pull/54922/head -&gt; origin/pr/54922  (forced update)
 + 8e2b70e269d...3d27aca8412 refs/pull/55106/head -&gt; origin/pr/55106  (forced update)
 + d461857626e...b1cbdb136ae refs/pull/55136/head -&gt; origin/pr/55136  (forced update)
 + a6801803b63...5238d0437e7 refs/pull/55327/head -&gt; origin/pr/55327  (forced update)
 + a38a6d09b10...c5ed72fbfe8 refs/pull/55330/head -&gt; origin/pr/55330  (forced update)
 + adafd0f9a04...9e479c2818e refs/pull/55349/head -&gt; origin/pr/55349  (forced update)
 + db40bedbc42...02d50de63e5 refs/pull/55366/head -&gt; origin/pr/55366  (forced update)
 + 4e3771b00fa...8740adbf1e6 refs/pull/55367/head -&gt; origin/pr/55367  (forced update)
 + 83d4a3a704e...0ffaa6cc313 refs/pull/55402/head -&gt; origin/pr/55402  (forced update)
   5e50acf443e..99f7dc451fb  refs/pull/55410/head -&gt; origin/pr/55410
   a7bea73292c..22b571d62a6  refs/pull/55495/head -&gt; origin/pr/55495
&lt;snip&gt;
</pre></div>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>